﻿using System;

namespace Maelu.Classes
{
    class Tools
    {
        /// <summary>
        /// Returns servername from server ID.
        /// </summary>
        /// <param name="serverID"></param>
        /// <returns></returns>
        public static string getServerName(int serverID)
        {
            switch (serverID)
            {
                case 0:
                    return "Bahamut";
                case 1:
                    return "Shiva";
                case 4:
                    return "Phoenix";
                case 5:
                    return "Carbuncle";
                case 6:
                    return "Fenrir";
                case 7:
                    return "Sylph";
                case 8:
                    return "Valefor";
                case 10:
                    return "Leviathan";
                case 11:
                    return "Odin";
                case 15:
                    return "Quetzalcoatl";
                case 16:
                    return "Siren";
                case 19:
                    return "Ragnarok";
                case 22:
                    return "Cerberus";
                case 24:
                    return "Bismarck";
                case 26:
                    return "Lakshmi";
                case 27:
                    return "Asura";
                case 155:
                    return "Lobby (Select character, try again)";
                default:
                    return "Unknown ServerID:" + serverID + " (please report this to nem.envyrests@gmail.com)";
            }
        }

        public static int priceFormat(string itemPrice)
        {
            return int.Parse(itemPrice);
        }

        public static double priceFormatInt(string itemPrice)
        {
            return Convert.ToDouble(int.Parse(itemPrice).ToString("N0"));
        }

    }
}
